# Maintainer: Alex McGrath <amk@amk.ie>
pkgname=fcft
pkgver=3.1.9
pkgrel=0
pkgdesc="Simple library for font loading and glyph rasterization using FontConfig, FreeType and pixman"
url="https://codeberg.org/dnkl/fcft"
license="MIT"
arch="all"
makedepends="
	meson
	scdoc
	fontconfig-dev
	freetype-dev
	harfbuzz-dev
	pixman-dev
	tllist-dev
	utf8proc-dev
	"
checkdepends="check-dev font-dejavu font-noto-emoji" # tests require a font to be installed
subpackages="$pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://codeberg.org/dnkl/fcft/archive/$pkgver.tar.gz"
builddir="$srcdir/fcft"

build() {
	abuild-meson \
		-Db_lto=true \
		-Dsvg-backend=nanosvg \
		-Dtest-text-shaping=true \
		. output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
a6a400baf35ea2780da6acc5e703755349474d82f3bad081ed0551d1d6b724247476bfae6aeab06238a37df269afa4fb7a774501a4665e1e90d6ed9f241307b2  fcft-3.1.9.tar.gz
"
